package com.own.business.message.center.controller.user.entity.vo;

import com.own.business.message.center.entity.map.MessageCenterContentMapVo;
import com.own.business.message.center.entity.map.MessageCenterGroupMapVo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * MessageCenterTypeMapShowVo
 *
 * @author chenxueli
 * @date 2023-11-13 17:53:00
 */
@Data
@NoArgsConstructor
public class MessageCenterTypeMapShowVo implements Serializable {

    @Schema(title = "封面")
    private String cover;

    @Schema(title = "消息key")
    private String groupKey;

    @Schema(title = "类型名称")
    private String name;

    @Schema(title = "未读消息数")
    private Integer unreadCount;

    @Schema(title = "最近的一条消息")
    private MessageCenterContentMapVo last;

    public MessageCenterTypeMapShowVo(MessageCenterGroupMapVo vo) {
        this.cover = vo.getCover();
        this.groupKey = vo.getGroupKey();
        this.name = vo.getName();
    }

}
